# -*- coding:utf-8 -*-
# editor: zzh
# date: 2022/9/23

import json
import pickle

# datas = json.load(open('data_label.json','r',encoding='utf8'))
# type2dicts = {"NA":0}
# for dd in datas:
#     for d in dd['content']:
#         infos = d['info']
#         ents = infos['ents']
#         triples = infos['triples']
#
#         for ent in ents:
#             if ent['type'] not in type2dicts:
#                 type2dicts[ent['type']] = 0
#             type2dicts[ent['type']]+=1
#
#         for triples in triples:
#             if triples['prop'] not in type2dicts:
#                 type2dicts[triples['prop']] = 0
#             type2dicts[triples['prop']]+=1
#
# print(type2dicts)
#
# type2dicts = sorted(type2dicts.items(), key = lambda x: x[1], reverse=True)
# print(type2dicts)


# i1 = pickle.load(open('intent2prop09.pkl','rb'))
# for i in i1:
#     print(i,i1[i])

